package com.team11.server.controller.teacher;


import com.team11.server.pojo.dto.RespPageBean;
import com.team11.server.service.IClockInformationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.time.LocalDate;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author pjc
 * @since 2021-07-06
 */
@CrossOrigin
@RestController
@RequestMapping("/teacher")
@Api(tags = "教师接口")
public class TeacherClockInformationController {
    @Resource
    private IClockInformationService clockInformationService;

    @ApiOperation("项目管理：获取门禁打卡记录")
    @GetMapping("/getAccessControl")
    public RespPageBean getAccessControl(@RequestParam(defaultValue = "1") Integer currentPage,
                                         @RequestParam(defaultValue = "10") Integer size,
                                         LocalDate startTime, LocalDate endTime, String sNumber, String sName) {
        return clockInformationService.getAccessControl(currentPage, size, startTime, endTime, sNumber, sName);
    }
}
